<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>书籍分类</title>
    <link rel="icon" type="image/x-icon" href="/images/logo.ico" />
    <link rel="stylesheet" href="/stylesheets/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="/stylesheets/index.css">
</head>
<body>
    <!-- 头部 -->
    <div class="container">
        <%include header%>
    </div>
    <div class="container">
        <div class="container-fluid">
            <div class="row">
                <div class="col-xs-10 col-md-10">
                    <ul class="list-group">
                        <li class="list-group-item">
                            <span >你当前所在的位置是 : 分类 / 
                                <%if(colmun_id){%>
                                    <span style="color:#3CB371" id="nav_change"><%=book[0].colmun_id.name%></span> / <span id="nav_change2" style="color:#3CB371">全部</span>
                                <%}else{%>
                                    <span style="color:#3CB371" id="nav_change">世界文学</span> / <span id="nav_change2" style="color:#3CB371">全部</span>
                                <%}%>        
                            </span>
                        </li>
                        <li class="list-group-item">
                            <span>热度 ↑</span>
                            <span style="margin-left:40px">价格 ↓</span>
                        </li>
                        <li class="list-group-item" id="book_list">
                            <div class="container-fluid book_list">
                                <div class="row">
                                    <%for(var i=0;i<book.length;i++){%>
                                    <div class="col-xs-6 col-md-3">
                                        <ul class="list-group book_list2">
                                            <li class="list-group-item">
                                                <a href="/bookDetil/?id=<%=book[i]._id%>"><img src="images/books/<%=book[i].img%>" style="width:160px;height:160px;"></a>
                                                <span class="topKuang">
                                                    <a href="javascript:void(0)" onclick="shoucang('<%=book[i]._id%>')">收藏</a>
                                                    <a href="javascript:void(0)" class="add_scar" onclick="join('<%=book[i]._id%>')">加入购物车</a>
                                                </span>
                                            </li>
                                            <li class="list-group-item" style="line-height:12px;max-height:75px">
                                                <p><%=book[i].name%></p>
                                                <p class="text-muted" style="margin-left:10px"><%=book[i].author_id.name%></p>
                                                <p class="color text-right" style="font-size:18px">￥<%=book[i].money%></p>
                                            </li>
                                        </ul>
                                    </div>
                                    <%}%>
                                </div>
                            </div>
                            <div class="container-fluid book_list">
                                <div class="row">
                                    <%for(var i=0;i<book.length;i++){%>
                                    <div class="col-xs-6 col-md-3">
                                        <ul class="list-group book_list2">
                                            <li class="list-group-item">
                                                <a href="/bookDetil/?id=<%=book[i]._id%>"><img src="images/books/<%=book[i].img%>" style="width:160px;height:160px;"></a>
                                                <span class="topKuang">
                                                    <a href="javascript:void(0)" onclick="shoucang('<%=book[i]._id%>')">收藏</a>
                                                    <a href="javascript:void(0)" class="add_scar"  onclick="join('<%=book[i]._id%>')">加入购物车</a>
                                                </span>
                                            </li>
                                            <li class="list-group-item" style="line-height:12px;max-height:75px">
                                                <p><%=book[i].name%></p>
                                                <p class="text-muted" style="margin-left:10px"><%=book[i].author_id.name%></p>
                                                <p class="color text-right" style="font-size:18px">￥<%=book[i].money%></p>
                                            </li>
                                        </ul>
                                    </div>
                                   <%}%>
                                </div>
                            </div>
                            <div class="container-fluid book_list">
                                <div class="row">
                                    <%for(var i=0;i<book.length;i++){%>
                                    <div class="col-xs-6 col-md-3">
                                        <ul class="list-group book_list2">
                                            <li class="list-group-item">
                                               <a href="/bookDetil/?id=<%=book[i]._id%>"><img src="images/books/<%=book[i].img%>" style="width:160px;height:160px;"></a>
                                                <span class="topKuang">
                                                    <a href="javascript:void(0)" onclick="shoucang('<%=book[i]._id%>')">收藏</a>
                                                    <a href="javascript:void(0)" class="add_scar"  onclick="join('<%=book[i]._id%>')">加入购物车</a>
                                                </span>
                                            </li>
                                            <li class="list-group-item" style="line-height:12px;max-height:75px">
                                                <p><%=book[i].name%></p>
                                                <p class="text-muted" style="margin-left:10px"><%=book[i].author_id.name%></p>
                                                <p class="color text-right" style="font-size:18px">￥<%=book[i].money%></p>
                                            </li>
                                        </ul>
                                    </div>
                                   <%}%>
                                </div>
                            </div>
                            <div class="container-fluid book_list">
                                <div class="row">
                                    <%for(var i=0;i<book.length;i++){%>
                                    <div class="col-xs-6 col-md-3">
                                        <ul class="list-group book_list2">
                                            <li class="list-group-item">
                                                <a href="/bookDetil/?id=<%=book[i]._id%>"><img src="images/books/<%=book[i].img%>" style="width:160px;height:160px;"></a>
                                                <span class="topKuang">
                                                    <a href="javascript:void(0)" onclick="shoucang('<%=book[i]._id%>')">收藏</a>
                                                    <a href="javascript:void(0)" class="add_scar"  onclick="join('<%=book[i]._id%>')">加入购物车</a>
                                                </span>
                                            </li>
                                            <li class="list-group-item" style="line-height:12px;max-height:75px">
                                                <p><%=book[i].name%></p>
                                                <p class="text-muted" style="margin-left:10px"><%=book[i].author_id.name%></p>
                                                <p class="color text-right" style="font-size:18px">￥<%=book[i].money%></p>
                                            </li>
                                        </ul>
                                    </div>
                                    <%}%>
                                </div>
                            </div>
                            <div class="container-fluid book_list">
                                <div class="row">
                                    <%for(var i=0;i<book.length;i++){%>
                                    <div class="col-xs-6 col-md-3">
                                        <ul class="list-group  book_list2">
                                            <li class="list-group-item">
                                                <a href="/bookDetil/?id=<%=book[i]._id%>"><img src="images/books/<%=book[i].img%>" style="width:160px;height:160px;"></a>
                                                <span class="topKuang">
                                                    <a href="javascript:void(0)" onclick="shoucang('<%=book[i]._id%>')">收藏</a>
                                                    <a href="javascript:void(0)" class="add_scar"  onclick="join('<%=book[i]._id%>')">加入购物车</a>
                                                </span>
                                            </li>
                                            <li class="list-group-item" style="line-height:12px;max-height:75px">
                                                <p><%=book[i].name%></p>
                                                <p class="text-muted" style="margin-left:10px"><%=book[i].author_id.name%></p>
                                                <p class="color text-right" style="font-size:18px">￥<%=book[i].money%></p>
                                            </li>
                                        </ul>
                                    </div>
                                    <%}%>
                                </div>
                            </div>
                        </li>
                    </ul>
                </div>
                <div class="col-xs-2 col-md-2">
                    <ul id="accordion" class="accordion">
                        <%for(var i=0;i<colmun.length;i++){%>
                            <li>
                                <div class="link" onclick="colmunName('<%=colmun[i]._id%>')">
                                    <%=colmun[i].name%>
                                    <i class="fa fa-chevron-down"></i>
                                </div>
                                <ul class="submenu">
                                </ul>
                            </li>
                        <%}%>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</body>
<script>
    var colmun_id='<%=colmun_id%>';
    if (colmun_id == null) {
        $('.book_list').eq(0).show().siblings().hide()
    } 
    if(colmun_id=='5ab44aca77e60c227cc9fa26'){
        $('.link').eq(0).addClass('nav_color')
        $('.book_list').eq(0).show().siblings().hide()
    }
    if (colmun_id == '5ab44ae177e60c227cc9fa29') {
         $('.link').eq(1).addClass('nav_color')
        $('.book_list').eq(1).show().siblings().hide()
    }
    if (colmun_id == '5ab44aee77e60c227cc9fa2b') {
        $('.link').eq(2).addClass('nav_color')
        $('.book_list').eq(2).show().siblings().hide()
    }
    if (colmun_id == '5ab44af977e60c227cc9fa2d') {
         $('.link').eq(3).addClass('nav_color')
        $('.book_list').eq(3).show().siblings().hide()
    }
    if (colmun_id == '5ab44b0377e60c227cc9fa2f') {
         $('.link').eq(4).addClass('nav_color')
        $('.book_list').eq(4).show().siblings().hide()
    }      
</script>
<script src="https://cdn.bootcss.com/jquery/1.9.1/jquery.min.js"></script>
<script src="/javascripts/bootstrap.js"></script>
<script src="/javascripts/jquery.fly.min.js"></script>
<script src="/javascripts/layer/layer.js"></script>
<script src="/javascripts/public.js"></script>
</html>